#ifndef _BSP_USART_H_
#define _BSP_USART_H_

#include "stm32f1xx_hal.h"

extern UART_HandleTypeDef huart1;

#define USARTx						USART1
#define USARTx_BAUDRATE				115200
#define USART_RCC_CLK_ENABLE()		__HAL_RCC_USART1_CLK_ENABLE()
#define USART_RCC_CLK_DISABLE()		__HAL_RCC_USART1_CLK_DISABLE()

#define USARTx_GPIO_CLK_ENABLE() 	__HAL_RCC_GPIOA_CLK_ENABLE()
#define USARTx_Tx_GPIO_PIN 		 	GPIO_PIN_9
#define USARTx_Tx_GPIO			 	GPIOA
#define USARTx_Rx_GPIO_PIN		 	GPIO_PIN_10
#define USARTx_Rx_GPIO			 	GPIOA
	
#define USARTx_IRQHandler		 	USART1_IRQHandler
#define USARTx_IRQn				 	USART1_IRQn

void USART_Config(void);

#endif
